<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<base target="_self">
<style type="text/css">
.selectList {
	width: 350px;
	border: 1px solid;
	margin-top: 5px;
}

.select_side {
	width: 350px;
}

select {
	width: 350px;
	height: 320px;
	background-color: #dcdcdc;
}

.content {
	width: 300px;
	margin-top: 5px;
}
</style>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript"
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function addText(sender) {
  var idx = sender.selectedIndex;
  if(idx < 0) return;
  var obj = new Object();
  obj.id = sender.options[sender.selectedIndex].value;
  obj.name = sender.options[sender.selectedIndex].text
  window.returnValue = obj;
  window.close();
}
function setKeyWord()
{
	document.getElementById("keyword").value = document.getElementById("content").value;
}
function cl()
{
	var obj = new Object();
    obj.id = '';
    obj.name = '';
	window.returnValue = obj;
    window.close();
}
</script>
</head>
<body>
<form action="common/data/get.do" method="get">
<div><input id="content" name="content" class="content"
	value="${keyword}" /> <input type="submit" id="search" name="search"
	value="搜索" onclick="setKeyWord();"/></div>
<div class="selectList">
<div class="select_side"><select id="selectL" name="selectL"
	multiple="multiple" ondblclick="addText(this);">
	<c:forEach var="returnValue" items="${selectList}">
		<option value="${returnValue.id}">${returnValue.displayName}${returnValue.otherInfo}</option>
	</c:forEach>
</select></div>
</div>
<div style="display:none"><input id="service" name="service"
	value="${servicename}"/> <input id="keyword" name="keyword"
	value="${keyword}" /></div>
<div style="text-align: center">
	<input type="button" id="cancel" name="cancel" value="取消" onClick="cl()"/>
</div>
</form>
</body>
</html>